<template>
  <el-card>
    <div class="box">
      <img :src="userStore.avatar" class="avatar">
      <div class="bottoms">
        <h3 class="title">{{ getTime() }}好!{{ userStore.username }}</h3>
        <p class="subtitle">硅谷甄选运营平台</p>
      </div>
    </div>
  </el-card>
  <div class="bottom"><svg-icon name="welcome" width="500px" height="400px"></svg-icon></div>
</template>

<script setup lang="ts">
//引入用户相关的仓库，获取当前用户的头像、昵称
import useUserStore from '@/store/modules/user';
import { getTime } from '@/utils/time';
//获取存储用户信息的仓库对象
let userStore = useUserStore();
</script>

<style lang="scss" scoped>
.box {
  display: flex;

  .avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
  }
}

.bottoms {
  margin-left: 20px;

  .title {
    font-size: 30px;
    margin-bottom: 20px;
    font-weight: 700;
  }
  .subtitle{
    font-style: italic;
    color: rgb(207, 219, 230);
  }
}
.bottom{
  display: flex;
  justify-content: center;
}
</style>